package gui;

import gui.user.User;

import java.awt.Point;
import java.awt.event.*;

import math.Vector2D;

public class GUIMouseListener implements MouseListener
{
	private User user;
	
	public GUIMouseListener( User u )
	{
		user = u;
	}
	
	public void mousePressed( MouseEvent e )
	{
		Point p = e.getPoint();
		user.mouseClick( e.getButton(), new Vector2D( p.getX(), p.getY() )  );
	}
	
	public void mouseReleased( MouseEvent e )
	{
		user.mouseRelease();
	}
	
	public void mouseClicked( MouseEvent e ){}
	
	public void mouseEntered( MouseEvent e ){}
	
	public void mouseExited( MouseEvent e ){}
}	
